package basic5;

import java.util.*;

public class J05_49 {

	public static void main(String[] args) {
		
		int temp;
		
		Scanner sc=new Scanner(System.in);
		System.out.print("첫번째 정수를 입력하세요  : ");
		int i = sc.nextInt();
		System.out.print("두번째 정수를 입력하세요  : ");
		int j = sc.nextInt();
		
	
		while((i % j!=0)||(j%i!=0)){
			
			--i;
			
		}

		
	}

}
